In an electronic compass for measuring the azimuth, the azimuth measurement is performed by detecting geomagnetism by using a geomagnetic sensor. Specifically, when the magnetic field is changed by movement of the electronic compass, and the like, the detected azimuth is changed according to the movement.
Further, when the electronic compass is mounted to an electronic device, such as a portable terminal, the azimuth can be obtained by the portable terminal, and the like.
However, when the azimuth measurement is performed only on the basis of geomagnetism detected by the geomagnetic sensor, accurate azimuth measurement cannot be performed in the state where the electronic device is inclined. For this reason, in recent years, an electronic device has been devised, which, in addition to a geomagnetic sensor, is provided with an acceleration sensor (configured as a six-axis sensor =a three-axis sensor +a three-axis sensor) for detecting acceleration as the movement of the electronic device. For example, a technique has been known, in which accurate azimuth measurement is performed regardless of the attitude of the electronic device by correcting the inclination angle of the electronic device (see, for example, Patent Literature 1).
Further, it has been known that, in an azimuth meter using a geomagnetic sensor, it is necessary to perform offset correction when the magnetic field is unexpectedly disturbed, and hence a method of performing the offset correction has been proposed (see, for example, Patent Literature 2).
Further, a method has been known, in which a plurality of offsets of a geomagnetic sensor are provided respectively for the attitudes and states of an electronic device (for example, opened and closed states of a portable terminal) (see, for example, Patent Literature 3).